//
//  HEFilterBottomView.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/11/2.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEFilterBottomView.h"

@implementation HEFilterBottomView

/** 快速初始化 */
- (instancetype _Nonnull )initBottomViewWithTarget:(id _Nonnull)target
                                       resetAction:(SEL _Nonnull )resetAction
                                     confirmAction:(SEL _Nonnull )confirmAction
{
    if (self = [super init]) {
        self.backgroundColor = [UIColor whiteColor];
        
        self.resetButton = [UIButton buttonWithType:UIButtonTypeCustom];
        self.resetButton.frame = CGRectMake(0, 0, KScreenWidth / 2, 50 );
        [self.resetButton setTitle:@"重置" forState:UIControlStateNormal];
        [self.resetButton setTitleColor:KTitleSelectedColor forState:UIControlStateNormal];
        [self.resetButton setBackgroundColor:[UIColor whiteColor]];
        self.resetButton.layer.masksToBounds = YES;
        self.resetButton.layer.borderColor = CSplitLineColor.CGColor;
        self.resetButton.layer.borderWidth = 1;
        self.resetButton.titleLabel.font = DYFont(16);
        [self.resetButton addTarget:target action:resetAction forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:self.resetButton];
        
        self.confirmButton = [UIButton buttonWithType:UIButtonTypeCustom];
        self.confirmButton.frame = CGRectMake(KScreenWidth / 2, 0, KScreenWidth / 2, 50);
        [self.confirmButton setTitle:@"确定" forState:UIControlStateNormal];
        [self.confirmButton addTarget:target action:confirmAction forControlEvents:UIControlEventTouchUpInside];
        [self.confirmButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [self.confirmButton setBackgroundColor:KTitleSelectedColor];
        self.confirmButton.layer.masksToBounds = YES;
        self.confirmButton.titleLabel.font = DYFont(16);
        [self addSubview:self.confirmButton];
    }
    return self;
}

@end
